package org.spring.controller;

import javax.servlet.http.HttpSession;

import org.spring.websocket.MessageHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class LoginController {
	@Autowired
	private MessageHandler handler;
	

	@RequestMapping(value="/login",method=RequestMethod.POST)
	public String dologin(String username,HttpSession session) throws Exception{
		session.setAttribute("username", username);
		return "chat";
	}
	
}
